<template>
  <div id="container">

  </div>
</template>

<script>
export default {
  name: "",
  props: [""],
  data() {
    return {};
  },

  components: {},

  computed: {},

  created() {},

  mounted() {
    var map = new BMapGL.Map("container");
    
    var point = new BMapGL.Point(116.33688933346252,40.009738273887905);
    map.centerAndZoom(point, 15); 
    map.enableScrollWheelZoom(true);
  //  map.centerAndZoom(new BMapGL.Point(116.404, 39.915), 11);
        // 创建城市选择控件
        var cityControl = new BMapGL.CityListControl({
            // 控件的停靠位置（可选，默认左上角）
            anchor: BMAP_ANCHOR_TOP_LEFT,
            // 控件基于停靠位置的偏移量（可选）
            offset: new BMapGL.Size(10, 5)
        });
        // 将控件添加到地图上
        map.addControl(cityControl);
  },

  methods: {},
};
</script>
<style scoped lang='less'>
#container{
  height: 500px;
  width: 1100px;
  border: 3px solid red;
}
</style>